import request from '@/utils/request'

// 查询财物列表
export function listProperty(query) {
  return request({
    url: '/oms/property/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/oms/property/initBean',
        method: 'post'
    })
}

export function initPackBean(id) {
    return request({
        url: '/oms/property/initPackBean/'+id,
        method: 'post'
    })
}

// 查询财物详细
export function getProperty(id) {
  return request({
    url: '/oms/property/' + id,
    method: 'get'
  })
}

// 新增财物
export function addProperty(data) {
  return request({
    url: '/oms/property',
    method: 'post',
    data: data
  })
}

// 修改财物
export function updateProperty(data) {
  return request({
    url: '/oms/property',
    method: 'put',
    data: data
  })
}

// 删除财物
export function delProperty(id) {
  return request({
    url: '/oms/property/' + id,
    method: 'delete'
  })
}

// 根据财物编号查询财物详细
export function getPropertyByNo(no) {
  return request({
    url: '/oms/property/byno/' + no,
    method: 'get'
  })
}

// 获取物品编号
export function getNums(data) {
  return request({
    url: '/oms/property/getPropertyNums',
    method: 'post',
    data:data
  })
}
